package com.ssm.pre.util;

import java.util.List;
import java.util.Map;

/**
 * 计算分页
 * @author 武腾坤
 *
 */
public class PageCount {

	public static List<Map<String, Object>> page(List<Map<String, Object>> beans, int page, int limit){
		List<Map<String, Object>> params = null;
		if((beans.size()/limit)+1 != page){
			params = beans.subList(page*limit-limit, page*limit);
		}else{
			params = beans.subList(page*limit-limit, beans.size());
		}
		return params;
		
	}
}
